﻿Public Class Foto : Implements IEquatable(Of Foto)

    Private Const CARPETA_IMAGEN As String = "\cartas\"
    Private Const EXTENSION_IMAGEN As String = ".png"
    'Todas las imágenes en un array -su nombre-
    Private Shared PosiblesFotos() As String = {
                                              "daisy",
                                               "bowser",
                                               "cartabomba",
                                               "cartachampiñon",
                                               "cartamario",
                                               "cartapeach",
                                               "cartaplantapiraña",
                                               "cartashy",
                                               "cartatoad",
                                               "cartayoshi",
                                               "fantasma",
                                               "goomba",
                                               "luigi",
                                               "spiny",
                                               "star",
                                               "wario",
                                               "bala",
                                               "caparazon_rojo",
                                               "caparazon_verde",
                                               "caparazon_azul"
 }
    Private _Foto As String
    Public Shared ReadOnly Property TotPosiblesFotos As Integer
        Get
            Return PosiblesFotos.Length
        End Get
    End Property


    Public ReadOnly Property Localizacion As String
        Get
            Return My.Application.Info.DirectoryPath & CARPETA_IMAGEN & _Foto & EXTENSION_IMAGEN
        End Get
    End Property
    Public Sub New(ByVal num As Integer)

        _Foto = PosiblesFotos(num)
    End Sub


    Public Overloads Function Equals(ByVal other As Foto) As Boolean Implements System.IEquatable(Of Foto).Equals
        Return Equals(other, Me)
    End Function
    Public Overloads Shared Function Equals(ByVal x As Foto, ByVal y As Foto) As Boolean
        Return x._Foto = y._Foto
    End Function
End Class
